package com.jr.service.Impl;

import com.jr.entity.Emp;
import com.jr.mapper.EmpMapper;
import com.jr.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;


@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    public EmpMapper getEmpMapper() {
        return empMapper;
    }

    public void setEmpMapper(EmpMapper empMapper) {
        this.empMapper = empMapper;
    }

    @Override
    public ArrayList<Emp> findAll() {
        return empMapper.selectAll();
    }

    @Override
    public int deleteEmp(int empmo) {
        return empMapper.deleteEmp(empmo);
    }

    @Override
    public ArrayList<Emp> selectByInfo(Emp emp) {
        return empMapper.selectByInfo(emp);
    }

    @Override
    public ArrayList<Emp> selectMgr() {
        return empMapper.selectMgr();
    }
}
